<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]>      <html class="no-js"> <!--<![endif]-->
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="">
  </head>
  <body>
    <!--[if lt IE 7]>
      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->
    
    <script>
       // 对字符串进行切割，切割成几个几个一组 比如 12345678093， 分成[12, 34, 56 ....]
      
      function sliceStrToArr (str, num) {
        str = str || ''
        num = num || 1
        var result = []
        const len = Math.ceil(str.length / num)
        for (var i = 0; i< len; i++) {
           result.push(str.slice(num * i, num * i + num))
        }
        return result
      }
      const testStr = 'asdklarropdg'
     console.log(sliceStrToArr(testStr, 3))
    

    </script>
  </body>
</html>